package com.itheima.demo2recursion;

public class RecursionDemo3 {
    public static void main(String[] args) {
        int n=10;
        System.out.println(function(n));
    }
    public static int function(int n){
        if(n==1){
            return 1;
        }else{
            return 2*(function(n-1)+1);
        }
    }
}
